package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    void deleteByPrimaryKey(Long id);

    void insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    void updateByPrimaryKey(Employee record);

    void insertBatchRelation(@Param("id") Long id,@Param("ids") Long[] ids);

    void deleteRelation(Long id);

    Employee selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    Employee selectOldPwd(String oldPassword);

    void updatePwd(@Param("id") Long id,@Param("newPassword") String newPassword);

    void bachDelete(Long[] ids);


    Employee selectByName(String name);
    List<Employee> selectByRoleSn(String... sns);

    List<Employee> selectForList(EmployeeQueryObject qo);
}

